<template>
    <div class='app-container'>
        <!-- 敲击物品 -->
        <Article :trigger-text="triggerText" @totalClick="addTotal" :total-click="totalClick"/>
        <!-- 总点击数 -->
        <total :total-click="totalClick"/>
    </div>
</template>

<script setup lang="ts">
import Article from './components/article/index.vue'
import total from './components/total/index.vue'
// 展示的文字
const triggerText:Ref<string> = ref('功德+1')

// 功德数量
const totalClick:Ref<number> = ref(0)

// 点击总数+1
const addTotal = () => totalClick.value++
</script>